//package office.documents4j;
//
//import com.documents4j.api.DocumentType;
//import com.documents4j.api.IConverter;
//import com.documents4j.job.LocalConverter;
//import java.io.*;
//
//public class PdfUtil {
//
//    /**
//     * 　　* word转pdf
//     *
//     * @param wordFilePath word文件路径
//     * @param pdfFilePath  pdf文件路径
//     * @return 成功或失败
//     */
//    public static boolean docxToPdf(String wordFilePath, String pdfFilePath) {
//        boolean result = false;
//
//        File inputFile = new File(wordFilePath);
//        File outputFile = new File(pdfFilePath);
//        try {
//            InputStream inputStream = new FileInputStream(inputFile);
//            OutputStream outputStream = new FileOutputStream(outputFile);
//            IConverter converter = LocalConverter.builder().build();
//            converter.convert(inputStream).as(DocumentType.MS_WORD).to(outputStream).as(DocumentType.PDF).prioritizeWith(1000).schedule();
//
//            outputStream.close();
//            result = true;
//        } catch (Exception e) {
//
//            e.printStackTrace();
//        }
//
//        return result;
//    }
//}